package hotel.action;

import hotel.service.IHotelService;
import javax.annotation.Resource;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import common.action.BaseAction;
import common.pojo.Hotel;


@Scope("prototype")
@Controller("hotelInfoAction")
public class HotelAction extends BaseAction {

	private static final long serialVersionUID = 1L;

	public String getHotel() {
		hotelInfo = hotelInfoService.findInfo();
		return "findSuccess";
	}

	public String update() {
		hotelInfoService.update(hotelInfo);
		url="panel/hotel/hotelInfo/getHotel.action";
		return SUCCESS;
	}

	@Resource
	private IHotelService hotelInfoService;
	private Hotel hotelInfo;

	public Hotel getHotelInfo() {
		return hotelInfo;
	}

	public void setHotelInfo(Hotel hotelInfo) {
		this.hotelInfo = hotelInfo;
	}

}